* --------------------- *
* This file loads the child level data to compute the various additional results
* reported in Appendices D, E and F.
* Author: Victor Ronda
* Date Created: 01 Mar 2020
* Last Update: 22 Jan 2023
* --------------------- *



clear all
set more off

**************************
*** Health and Dominance Measures ***
**************************

use "offspring_data.dta", replace

rename health_issue_m_10m3y hi_m_13
rename dominance* dom*
rename dom_relative_rank dom_pct


replace hi_m_13=1-hi_m_13
replace hi_m_13=. if obs_10m3y<=5

xtile mcoh1=mom_cohort if hi_m_13 ~=.,n(20)
xtile coh1=cohort if hi_m_13 ~=.,n(20)

local controls1 "coh1 female primip obs_10m3y"
local controls2 "mcoh1 mom_primip coh1 female primip"
local controls3 "mcoh1 mom_primip coh1 female primip obs_10m3y"

xtile mcoh3=mom_cohort if dom_pct ~=.,n(20)
xtile coh3=cohort if dom_pct ~=.,n(20)

local controls5 "coh3 female primip agedom"
local controls6 "mcoh3 mom_primip coh3 female primip"
local controls7 "mcoh3 mom_primip coh3 female primip agedom"


keep if rear_inte~=.
gen treat0=(rear_inte==0)
gen treat1=(rear_inte==1)
gen treat2=(rear_inte==2)
gen treat3=(rear_inte==3)

keep if rear_inte~=.
foreach var of varlist  hi_m_13 dom_pct{
gen a=0
replace a=1 if `var'~=.
logit a cohort female mom_cohort mom_primip primip
predict ahat_`var'
drop a
}



**************************************
************** APPENDIX **************
**************************************

***** Primiparity ****
**** Table D2 ****

foreach var of varlist hi_m_13{
qui eststo r3_po_`var': reg `var' treat0 treat1 treat2 `controls3' if primip==0, vce(cl mom_id) 
qui eststo r2_po_`var': reg `var' treat0 treat1 treat3 `controls3' if primip==0, vce(cl mom_id)  
qui eststo r1_po_`var': reg `var' treat0 treat2 treat3 `controls3' if primip==0, vce(cl mom_id)  

qui reg `var' treat0 treat1 treat2 `controls3' if primip==0, vce(cl mom_id)   
qui eststo rdif_po_`var': nlcom _b[treat0]-_b[treat1]-_b[treat2], post
}

foreach var of varlist dom_pct{
qui eststo r3_po_`var': reg `var' treat0 treat1 treat2 `controls7' if primip==0, vce(cl mom_id) 
qui eststo r2_po_`var': reg `var' treat0 treat1 treat3 `controls7' if primip==0, vce(cl mom_id)  
qui eststo r1_po_`var': reg `var' treat0 treat2 treat3 `controls7' if primip==0, vce(cl mom_id)   

qui reg `var' treat0 treat1 treat2 `controls7', vce(cl mom_id)   
qui eststo rdif_po_`var': nlcom _b[treat0]-_b[treat1]-_b[treat2], post
}

estout r3_po_* , keep(treat1)  cells(b(fmt(3)) p(par([ ]) fmt(3))) label style(tex) starlevels( * 0.1 ** 0.05 *** 0.01) replace collabels(,none) mlabels("" "" "" "" "" "") eqlabel("" "") varlabels(treat1 "$\Psi(s_{0,1})-\Psi(s_{0,0})$" )
estout r2_po_* , keep(treat0)  cells(b(fmt(3)) p(par([ ]) fmt(3))) label style(tex) starlevels( * 0.1 ** 0.05 *** 0.01) replace collabels(,none) mlabels("" "" "" "" "" "") eqlabel("" "") varlabels(treat0 "$\Psi(s_{1,1})-\Psi(s_{1,0})$" )
estout r3_po_* , keep(treat2)  cells(b(fmt(3)) p(par([ ]) fmt(3))) label style(tex) starlevels( * 0.1 ** 0.05 *** 0.01) replace collabels(,none) mlabels("" "" "" "" "" "") eqlabel("" "") varlabels(treat2 "$\Psi(s_{1,0})-\Psi(s_{0,0})$" )
estout r1_po_* , keep(treat0)  cells(b(fmt(3)) p(par([ ]) fmt(3))) label style(tex) starlevels( * 0.1 ** 0.05 *** 0.01) replace collabels(,none) mlabels("" "" "" "" "" "") eqlabel("" "") varlabels(treat0 "$\Psi(s_{1,1})-\Psi(s_{0,1})$" )
estout r1_po_* , keep(treat2)  cells(b(fmt(3)) p(par([ ]) fmt(3))) label style(tex) starlevels( * 0.1 ** 0.05 *** 0.01) replace collabels(,none) mlabels("" "" "" "" "" "") eqlabel("" "") varlabels(treat2 "$\Psi(s_{1,0})-\Psi(s_{0,1})$" )
estout r3_po_* , keep(treat0)  cells(b(fmt(3)) p(par([ ]) fmt(3))) label style(tex) starlevels( * 0.1 ** 0.05 *** 0.01) replace collabels(,none) mlabels("" "" "" "" "" "") eqlabel("" "") varlabels(treat0 "$\Psi(s_{1,1})-\Psi(s_{0,0})$" )
estout rdif_po_* , cells(b(fmt(3)) p(par([ ]) fmt(3))) label style(tex) starlevels( * 0.1 ** 0.05 *** 0.01) replace collabels(,none) mlabels("" "" "" "" "" "") eqlabel("" "") varlabels(_nl_1 "$ [\Psi(s_{1,1})-\Psi(s_{0,1})] -[\Psi(s_{1,0})-\Psi(s_{0,0})] $" )


***** Sex Differences ****
**** Table E2 ****

foreach var of varlist hi_m_13{
qui eststo r3_fo0_`var': reg `var' treat0 treat1 treat2 `controls3' if female==0, vce(cl mom_id) 
qui eststo r2_fo0_`var': reg `var' treat0 treat1 treat3 `controls3' if female==0, vce(cl mom_id)  
qui eststo r1_fo0_`var': reg `var' treat0 treat2 treat3 `controls3' if female==0, vce(cl mom_id)  

qui eststo r3_fo1_`var': reg `var' treat0 treat1 treat2 `controls3' if female==1, vce(cl mom_id) 
qui eststo r2_fo1_`var': reg `var' treat0 treat1 treat3 `controls3' if female==1, vce(cl mom_id)  
qui eststo r1_fo1_`var': reg `var' treat0 treat2 treat3 `controls3' if female==1, vce(cl mom_id)  

qui reg `var' treat0 treat1 treat2 `controls3' if female==0, vce(cl mom_id)   
qui eststo rdif_fo0_`var': nlcom _b[treat0]-_b[treat1]-_b[treat2], post

qui reg `var' treat0 treat1 treat2 `controls3' if female==1, vce(cl mom_id)   
qui eststo rdif_fo1_`var': nlcom _b[treat0]-_b[treat1]-_b[treat2], post
}

foreach var of varlist dom_pct{
qui eststo r3_fo0_`var': reg `var' treat0 treat1 treat2 `controls7' if female==0, vce(cl mom_id) 
qui eststo r2_fo0_`var': reg `var' treat0 treat1 treat3 `controls7' if female==0, vce(cl mom_id)  
qui eststo r1_fo0_`var': reg `var' treat0 treat2 treat3 `controls7' if female==0, vce(cl mom_id)  

qui eststo r3_fo1_`var': reg `var' treat0 treat1 treat2 `controls7' if female==1, vce(cl mom_id) 
qui eststo r2_fo1_`var': reg `var' treat0 treat1 treat3 `controls7' if female==1, vce(cl mom_id)  
qui eststo r1_fo1_`var': reg `var' treat0 treat2 treat3 `controls7' if female==1, vce(cl mom_id)  

qui reg `var' treat0 treat1 treat2 `controls7' if female==0, vce(cl mom_id)   
qui eststo rdif_fo0_`var': nlcom _b[treat0]-_b[treat1]-_b[treat2], post

qui reg `var' treat0 treat1 treat2 `controls7' if female==1, vce(cl mom_id)   
qui eststo rdif_fo1_`var': nlcom _b[treat0]-_b[treat1]-_b[treat2], post
}


*** Columns [1], [2], [4], [5] ***
estout r3_fo*_* , keep(treat1)  cells(b(fmt(3)) p(par([ ]) fmt(3))) label style(tex) starlevels( * 0.1 ** 0.05 *** 0.01) replace collabels(,none) mlabels("" "" "" "" "" "") eqlabel("" "") varlabels(treat1 "$\Psi(s_{0,1})-\Psi(s_{0,0})$" )
estout r2_fo*_* , keep(treat0)  cells(b(fmt(3)) p(par([ ]) fmt(3))) label style(tex) starlevels( * 0.1 ** 0.05 *** 0.01) replace collabels(,none) mlabels("" "" "" "" "" "") eqlabel("" "") varlabels(treat0 "$\Psi(s_{1,1})-\Psi(s_{1,0})$" )
estout r3_fo*_* , keep(treat2)  cells(b(fmt(3)) p(par([ ]) fmt(3))) label style(tex) starlevels( * 0.1 ** 0.05 *** 0.01) replace collabels(,none) mlabels("" "" "" "" "" "") eqlabel("" "") varlabels(treat2 "$\Psi(s_{1,0})-\Psi(s_{0,0})$" )
estout r1_fo*_* , keep(treat0)  cells(b(fmt(3)) p(par([ ]) fmt(3))) label style(tex) starlevels( * 0.1 ** 0.05 *** 0.01) replace collabels(,none) mlabels("" "" "" "" "" "") eqlabel("" "") varlabels(treat0 "$\Psi(s_{1,1})-\Psi(s_{0,1})$" )
estout r1_fo*_* , keep(treat2)  cells(b(fmt(3)) p(par([ ]) fmt(3))) label style(tex) starlevels( * 0.1 ** 0.05 *** 0.01) replace collabels(,none) mlabels("" "" "" "" "" "") eqlabel("" "") varlabels(treat2 "$\Psi(s_{1,0})-\Psi(s_{0,1})$" )
estout r3_fo*_* , keep(treat0)  cells(b(fmt(3)) p(par([ ]) fmt(3))) label style(tex) starlevels( * 0.1 ** 0.05 *** 0.01) replace collabels(,none) mlabels("" "" "" "" "" "") eqlabel("" "") varlabels(treat0 "$\Psi(s_{1,1})-\Psi(s_{0,0})$" )
estout rdif_fo* , cells(b(fmt(3)) p(par([ ]) fmt(3))) label style(tex) starlevels( * 0.1 ** 0.05 *** 0.01) replace collabels(,none) mlabels("" "" "" "" "" "") eqlabel("" "") varlabels(_nl_1 "$ [\Psi(s_{1,1})-\Psi(s_{0,1})] -[\Psi(s_{1,0})-\Psi(s_{0,0})] $" )


* sex differences *
*** Columns [3], [6] ***
qui reg dom_pct treat1 treat2 treat3 mcoh3 mom_primip coh3 female primip agedom i.female#c.(treat1 treat2 treat3 mcoh3 mom_primip coh3 female primip agedom) , vce(cl mom_id)
test 1.female#c.treat1
test 1.female#c.treat2
test 1.female#c.treat3

qui reg dom_pct treat0 treat2 treat3 mcoh3 mom_primip coh3 female primip agedom i.female#c.(treat0 treat2 treat3 mcoh3 mom_primip coh3 female primip agedom) , vce(cl mom_id)
test 1.female#c.treat2
test 1.female#c.treat3

qui reg dom_pct treat0 treat1 treat3 mcoh3 mom_primip coh3 female primip agedom i.female#c.(treat0 treat1 treat3 mcoh3 mom_primip coh3 female primip agedom) , vce(cl mom_id)
test 1.female#c.treat3

qui reg hi_m_13 treat1 treat2 treat3 mcoh1 mom_primip coh1 female primip obs_10m3y i.female#c.(treat1 treat2 treat3 mcoh1 mom_primip coh1 primip obs_10m3y) , vce(cl mom_id)
test 1.female#c.treat1
test 1.female#c.treat2
test 1.female#c.treat3

qui reg hi_m_13 treat0 treat2 treat3 mcoh1 mom_primip coh1 female primip obs_10m3y i.female#c.(treat0 treat2 treat3 mcoh1 mom_primip coh1 primip obs_10m3y) , vce(cl mom_id)
test 1.female#c.treat2
test 1.female#c.treat3

qui reg hi_m_13 treat0 treat1 treat3 mcoh1 mom_primip coh1 female primip obs_10m3y i.female#c.(treat0 treat1 treat3 mcoh1 mom_primip coh1 primip obs_10m3y) , vce(cl mom_id)
test 1.female#c.treat3

qui reg hi_m_13 treat0 treat1 treat2 mcoh1 mom_primip coh1 female primip obs_10m3y i.female#c.(treat0 treat1 treat2 mcoh1 mom_primip coh1 primip obs_10m3y), vce(cl mom_id)   
nlcom _b[1.female#c.treat0]-_b[1.female#c.treat1]-_b[1.female#c.treat2], post

qui reg dom_pct treat0 treat1 treat2 mcoh3 mom_primip coh3 female primip agedom i.female#c.(treat0 treat1 treat2 mcoh3 mom_primip coh3 female primip agedom) , vce(cl mom_id)   
nlcom _b[1.female#c.treat0]-_b[1.female#c.treat1]-_b[1.female#c.treat2], post




***** Peer-Rearing (PR) and Surrogate-Peer-Rearing (SPR) ****
**** Tables F1- F4 ****


gen rear_inte_ext=0 if rear=="MR" & mom_rear=="MR"
replace rear_inte_ext=1 if rear=="MR" & mom_rear=="PR"
replace rear_inte_ext=2 if rear=="MR" & mom_rear=="SPR"
replace rear_inte_ext=3 if rear=="PR" & mom_rear=="MR"
replace rear_inte_ext=4 if rear=="PR" & mom_rear=="PR"
replace rear_inte_ext=5 if rear=="PR" & mom_rear=="SPR"
replace rear_inte_ext=6 if rear=="SPR" & mom_rear=="MR"
replace rear_inte_ext=7 if rear=="SPR" & mom_rear=="PR"
replace rear_inte_ext=8 if rear=="SPR" & mom_rear=="SPR"

gen treat_ext_0=(rear_inte_ext==0)
gen treat_ext_1=(rear_inte_ext==1)
gen treat_ext_2=(rear_inte_ext==2)
gen treat_ext_3=(rear_inte_ext==3)
gen treat_ext_4=(rear_inte_ext==4)
gen treat_ext_5=(rear_inte_ext==5)
gen treat_ext_6=(rear_inte_ext==6)
gen treat_ext_7=(rear_inte_ext==7)
gen treat_ext_8=(rear_inte_ext==8)

local controls7 "mcoh3 mom_primip coh3 female primip agedom"
local controls3 "mcoh1 mom_primip coh1 female primip obs_10m3y"
foreach var of varlist hi_m_13{
qui eststo r1_ro_`var': reg `var' treat_ext_0 treat_ext_2 treat_ext_3 treat_ext_4 treat_ext_5 treat_ext_6 treat_ext_7 treat_ext_8 `controls3', vce(cl mom_id)     
qui eststo r2_ro_`var': reg `var' treat_ext_0 treat_ext_1 treat_ext_3 treat_ext_4 treat_ext_5 treat_ext_6 treat_ext_7 treat_ext_8 `controls3', vce(cl mom_id)  
qui eststo r3_ro_`var': reg `var' treat_ext_0 treat_ext_1 treat_ext_2 treat_ext_4 treat_ext_5 treat_ext_6 treat_ext_7 treat_ext_8 `controls3', vce(cl mom_id)  
qui eststo r4_ro_`var': reg `var' treat_ext_0 treat_ext_1 treat_ext_2 treat_ext_3 treat_ext_5 treat_ext_6 treat_ext_7 treat_ext_8 `controls3', vce(cl mom_id)  
qui eststo r5_ro_`var': reg `var' treat_ext_0 treat_ext_1 treat_ext_2 treat_ext_3 treat_ext_4 treat_ext_6 treat_ext_7 treat_ext_8 `controls3', vce(cl mom_id)  
qui eststo r6_ro_`var': reg `var' treat_ext_0 treat_ext_1 treat_ext_2 treat_ext_3 treat_ext_4 treat_ext_5 treat_ext_7 treat_ext_8 `controls3', vce(cl mom_id)  
qui eststo r7_ro_`var': reg `var' treat_ext_0 treat_ext_1 treat_ext_2 treat_ext_3 treat_ext_4 treat_ext_5 treat_ext_6 treat_ext_8 `controls3', vce(cl mom_id)  
qui eststo r8_ro_`var': reg `var' treat_ext_0 treat_ext_1 treat_ext_2 treat_ext_3 treat_ext_4 treat_ext_5 treat_ext_6 treat_ext_7 `controls3', vce(cl mom_id)  

qui reg `var' treat_ext_1 treat_ext_2 treat_ext_3 treat_ext_4 treat_ext_5 treat_ext_6 treat_ext_7 treat_ext_8 `controls3', vce(cl mom_id)   
qui eststo rdif_1_ro_`var': nlcom -_b[treat_ext_1]-_b[treat_ext_3]+_b[treat_ext_4], post

qui reg `var' treat_ext_1 treat_ext_2 treat_ext_3 treat_ext_4 treat_ext_5 treat_ext_6 treat_ext_7 treat_ext_8 `controls3', vce(cl mom_id)   
qui eststo rdif_2_ro_`var': nlcom -_b[treat_ext_2]-_b[treat_ext_6]+_b[treat_ext_8], post

qui reg `var' treat_ext_0 treat_ext_1 treat_ext_2 treat_ext_3 treat_ext_5 treat_ext_6 treat_ext_7 treat_ext_8 `controls3', vce(cl mom_id)   
qui eststo rdif_3_ro_`var': nlcom -_b[treat_ext_5]-_b[treat_ext_7]+_b[treat_ext_8], post
}

foreach var of varlist dom_pct{
qui eststo r1_ro_`var': reg `var' treat_ext_0 treat_ext_2 treat_ext_3 treat_ext_4 treat_ext_5 treat_ext_6 treat_ext_7 treat_ext_8 `controls7', vce(cl mom_id)     
qui eststo r2_ro_`var': reg `var' treat_ext_0 treat_ext_1 treat_ext_3 treat_ext_4 treat_ext_5 treat_ext_6 treat_ext_7 treat_ext_8 `controls7', vce(cl mom_id)  
qui eststo r3_ro_`var': reg `var' treat_ext_0 treat_ext_1 treat_ext_2 treat_ext_4 treat_ext_5 treat_ext_6 treat_ext_7 treat_ext_8 `controls7', vce(cl mom_id)  
qui eststo r4_ro_`var': reg `var' treat_ext_0 treat_ext_1 treat_ext_2 treat_ext_3 treat_ext_5 treat_ext_6 treat_ext_7 treat_ext_8 `controls7', vce(cl mom_id)  
qui eststo r5_ro_`var': reg `var' treat_ext_0 treat_ext_1 treat_ext_2 treat_ext_3 treat_ext_4 treat_ext_6 treat_ext_7 treat_ext_8 `controls7', vce(cl mom_id)  
qui eststo r6_ro_`var': reg `var' treat_ext_0 treat_ext_1 treat_ext_2 treat_ext_3 treat_ext_4 treat_ext_5 treat_ext_7 treat_ext_8 `controls7', vce(cl mom_id)  
qui eststo r7_ro_`var': reg `var' treat_ext_0 treat_ext_1 treat_ext_2 treat_ext_3 treat_ext_4 treat_ext_5 treat_ext_6 treat_ext_8 `controls7', vce(cl mom_id)  
qui eststo r8_ro_`var': reg `var' treat_ext_0 treat_ext_1 treat_ext_2 treat_ext_3 treat_ext_4 treat_ext_5 treat_ext_6 treat_ext_7 `controls7', vce(cl mom_id)  

qui reg `var' treat_ext_1 treat_ext_2 treat_ext_3 treat_ext_4 treat_ext_5 treat_ext_6 treat_ext_7 treat_ext_8 `controls7', vce(cl mom_id)   
qui eststo rdif_1_ro_`var': nlcom -_b[treat_ext_1]-_b[treat_ext_3]+_b[treat_ext_4], post

qui reg `var' treat_ext_1 treat_ext_2 treat_ext_3 treat_ext_4 treat_ext_5 treat_ext_6 treat_ext_7 treat_ext_8 `controls7', vce(cl mom_id)   
qui eststo rdif_2_ro_`var': nlcom -_b[treat_ext_2]-_b[treat_ext_6]+_b[treat_ext_8], post

qui reg `var' treat_ext_0 treat_ext_1 treat_ext_2 treat_ext_3 treat_ext_5 treat_ext_6 treat_ext_7 treat_ext_8 `controls7', vce(cl mom_id)   
qui eststo rdif_3_ro_`var': nlcom -_b[treat_ext_5]-_b[treat_ext_7]+_b[treat_ext_8], post
}

**** Table F1 ****
estout r8_ro_* , keep(treat_ext_5)  cells(b(fmt(3)) p(par([ ]) fmt(3))) label style(tex) starlevels( * 0.1 ** 0.05 *** 0.01) replace collabels(,none) mlabels("" "" "" "" "" "") eqlabel("" "") varlabels(treat_ext_5 "$\Psi(s_{spr,pr})-\Psi(s_{spr,spr})$" )
estout r7_ro_* , keep(treat_ext_4)  cells(b(fmt(3)) p(par([ ]) fmt(3))) label style(tex) starlevels( * 0.1 ** 0.05 *** 0.01) replace collabels(,none) mlabels("" "" "" "" "" "") eqlabel("" "") varlabels(treat_ext_4 "$\Psi(s_{pr,pr})-\Psi(s_{pr,spr})$" )
estout r8_ro_* , keep(treat_ext_7)  cells(b(fmt(3)) p(par([ ]) fmt(3))) label style(tex) starlevels( * 0.1 ** 0.05 *** 0.01) replace collabels(,none) mlabels("" "" "" "" "" "") eqlabel("" "") varlabels(treat_ext_7 "$\Psi(s_{pr,spr})-\Psi(s_{spr,spr})$" )
estout r5_ro_* , keep(treat_ext_4)  cells(b(fmt(3)) p(par([ ]) fmt(3))) label style(tex) starlevels( * 0.1 ** 0.05 *** 0.01) replace collabels(,none) mlabels("" "" "" "" "" "") eqlabel("" "") varlabels(treat_ext_4 "$\Psi(s_{pr,pr})-\Psi(s_{spr,pr})$" )
estout r5_ro_* , keep(treat_ext_7)  cells(b(fmt(3)) p(par([ ]) fmt(3))) label style(tex) starlevels( * 0.1 ** 0.05 *** 0.01) replace collabels(,none) mlabels("" "" "" "" "" "") eqlabel("" "") varlabels(treat_ext_7 "$\Psi(s_{pr,spr})-\Psi(s_{spr,pr})$" )
estout r8_ro_* , keep(treat_ext_4)  cells(b(fmt(3)) p(par([ ]) fmt(3))) label style(tex) starlevels( * 0.1 ** 0.05 *** 0.01) replace collabels(,none) mlabels("" "" "" "" "" "") eqlabel("" "") varlabels(treat_ext_4 "$\Psi(s_{pr,pr})-\Psi(s_{spr,spr})$" )
estout rdif_3_ro_* , cells(b(fmt(3)) p(par([ ]) fmt(3))) label style(tex) starlevels( * 0.1 ** 0.05 *** 0.01) replace collabels(,none) mlabels("" "" "" "" "" "") eqlabel("" "") varlabels(_nl_1 "$ [\Psi(s_{pr,pr})-\Psi(s_{spr,pr})] -[\Psi(s_{pr,spr})-\Psi(s_{spr,spr})] $" )


**** Table F2 ****
estout r4_ro_* , keep(treat_ext_1)  cells(b(fmt(3)) p(par([ ]) fmt(3))) label style(tex) starlevels( * 0.1 ** 0.05 *** 0.01) replace collabels(,none) mlabels("" "" "" "" "" "") eqlabel("" "") varlabels(treat_ext_1 "$\Psi(s_{pr,mr})-\Psi(s_{pr,pr})$" )
estout r3_ro_* , keep(treat_ext_0)  cells(b(fmt(3)) p(par([ ]) fmt(3))) label style(tex) starlevels( * 0.1 ** 0.05 *** 0.01) replace collabels(,none) mlabels("" "" "" "" "" "") eqlabel("" "") varlabels(treat_ext_0 "$\Psi(s_{mr,mr})-\Psi(s_{mr,pr})$" )
estout r4_ro_* , keep(treat_ext_3)  cells(b(fmt(3)) p(par([ ]) fmt(3))) label style(tex) starlevels( * 0.1 ** 0.05 *** 0.01) replace collabels(,none) mlabels("" "" "" "" "" "") eqlabel("" "") varlabels(treat_ext_3 "$\Psi(s_{mr,pr})-\Psi(s_{pr,pr})$" )
estout r1_ro_* , keep(treat_ext_0)  cells(b(fmt(3)) p(par([ ]) fmt(3))) label style(tex) starlevels( * 0.1 ** 0.05 *** 0.01) replace collabels(,none) mlabels("" "" "" "" "" "") eqlabel("" "") varlabels(treat_ext_0 "$\Psi(s_{mr,mr})-\Psi(s_{pr,mr})$" )
estout r1_ro_* , keep(treat_ext_3)  cells(b(fmt(3)) p(par([ ]) fmt(3))) label style(tex) starlevels( * 0.1 ** 0.05 *** 0.01) replace collabels(,none) mlabels("" "" "" "" "" "") eqlabel("" "") varlabels(treat_ext_3 "$\Psi(s_{mr,pr})-\Psi(s_{pr,mr})$" )
estout r4_ro_* , keep(treat_ext_0)  cells(b(fmt(3)) p(par([ ]) fmt(3))) label style(tex) starlevels( * 0.1 ** 0.05 *** 0.01) replace collabels(,none) mlabels("" "" "" "" "" "") eqlabel("" "") varlabels(treat_ext_0 "$\Psi(s_{mr,mr})-\Psi(s_{pr,pr})$" )
estout rdif_1_ro_* , cells(b(fmt(3)) p(par([ ]) fmt(3))) label style(tex) starlevels( * 0.1 ** 0.05 *** 0.01) replace collabels(,none) mlabels("" "" "" "" "" "") eqlabel("" "") varlabels(_nl_1 "$ [\Psi(s_{mr,mr})-\Psi(s_{pr,mr})] -[\Psi(s_{mr,pr})-\Psi(s_{pr,pr})] $" )

**** Table F3 ****
estout r8_ro_* , keep(treat_ext_2)  cells(b(fmt(3)) p(par([ ]) fmt(3))) label style(tex) starlevels( * 0.1 ** 0.05 *** 0.01) replace collabels(,none) mlabels("" "" "" "" "" "") eqlabel("" "") varlabels(treat_ext_2 "$\Psi(s_{spr,mr})-\Psi(s_{spr,spr})$" )
estout r6_ro_* , keep(treat_ext_0)  cells(b(fmt(3)) p(par([ ]) fmt(3))) label style(tex) starlevels( * 0.1 ** 0.05 *** 0.01) replace collabels(,none) mlabels("" "" "" "" "" "") eqlabel("" "") varlabels(treat_ext_0 "$\Psi(s_{mr,mr})-\Psi(s_{mr,spr})$" )
estout r8_ro_* , keep(treat_ext_6)  cells(b(fmt(3)) p(par([ ]) fmt(3))) label style(tex) starlevels( * 0.1 ** 0.05 *** 0.01) replace collabels(,none) mlabels("" "" "" "" "" "") eqlabel("" "") varlabels(treat_ext_6 "$\Psi(s_{mr,spr})-\Psi(s_{spr,spr})$" )
estout r2_ro_* , keep(treat_ext_0)  cells(b(fmt(3)) p(par([ ]) fmt(3))) label style(tex) starlevels( * 0.1 ** 0.05 *** 0.01) replace collabels(,none) mlabels("" "" "" "" "" "") eqlabel("" "") varlabels(treat_ext_0 "$\Psi(s_{mr,mr})-\Psi(s_{spr,mr})$" )
estout r2_ro_* , keep(treat_ext_6)  cells(b(fmt(3)) p(par([ ]) fmt(3))) label style(tex) starlevels( * 0.1 ** 0.05 *** 0.01) replace collabels(,none) mlabels("" "" "" "" "" "") eqlabel("" "") varlabels(treat_ext_6 "$\Psi(s_{mr,spr})-\Psi(s_{spr,mr})$" )
estout r8_ro_* , keep(treat_ext_0)  cells(b(fmt(3)) p(par([ ]) fmt(3))) label style(tex) starlevels( * 0.1 ** 0.05 *** 0.01) replace collabels(,none) mlabels("" "" "" "" "" "") eqlabel("" "") varlabels(treat_ext_0 "$\Psi(s_{mr,mr})-\Psi(s_{spr,spr})$" )
estout rdif_2_ro_* , cells(b(fmt(3)) p(par([ ]) fmt(3))) label style(tex) starlevels( * 0.1 ** 0.05 *** 0.01) replace collabels(,none) mlabels("" "" "" "" "" "") eqlabel("" "") varlabels(_nl_1 "$ [\Psi(s_{mr,mr})-\Psi(s_{spr,mr})] -[\Psi(s_{mr,spr})-\Psi(s_{spr,spr})] $" )


**** Table F4 ****
qui reg hi_m_13 treat_ext_1 treat_ext_2 treat_ext_3 treat_ext_4 treat_ext_5 treat_ext_6 treat_ext_7 treat_ext_8 mcoh1 mom_primip coh1 female primip obs_10m3y, vce(cl mom_id)  
nlcom (_b[treat_ext_1]-_b[treat_ext_4])-(_b[treat_ext_2]-_b[treat_ext_8]), post
qui reg hi_m_13 treat_ext_0 treat_ext_2 treat_ext_3 treat_ext_4 treat_ext_5 treat_ext_6 treat_ext_7 treat_ext_8 mcoh1 mom_primip coh1 female primip obs_10m3y, vce(cl mom_id)  
nlcom (_b[treat_ext_0]-_b[treat_ext_3])-(_b[treat_ext_0]-_b[treat_ext_6]), post
qui reg hi_m_13 treat_ext_1 treat_ext_2 treat_ext_3 treat_ext_4 treat_ext_5 treat_ext_6 treat_ext_7 treat_ext_8 mcoh1 mom_primip coh1 female primip obs_10m3y, vce(cl mom_id)  
nlcom (_b[treat_ext_3]-_b[treat_ext_4])-(_b[treat_ext_6]-_b[treat_ext_8]), post
qui reg hi_m_13 treat_ext_0 treat_ext_1 treat_ext_2 treat_ext_4 treat_ext_5 treat_ext_6 treat_ext_7 treat_ext_8 mcoh1 mom_primip coh1 female primip obs_10m3y, vce(cl mom_id)  
nlcom (_b[treat_ext_0]-_b[treat_ext_1])-(_b[treat_ext_0]-_b[treat_ext_2]), post
qui reg hi_m_13 treat_ext_1 treat_ext_2 treat_ext_3 treat_ext_4 treat_ext_5 treat_ext_6 treat_ext_7 treat_ext_8 mcoh1 mom_primip coh1 female primip obs_10m3y, vce(cl mom_id)  
nlcom (_b[treat_ext_3]-_b[treat_ext_1])-(_b[treat_ext_6]-_b[treat_ext_2]), post
qui reg hi_m_13 treat_ext_0 treat_ext_2 treat_ext_3 treat_ext_4 treat_ext_5 treat_ext_6 treat_ext_7 treat_ext_8 mcoh1 mom_primip coh1 female primip obs_10m3y, vce(cl mom_id)  
nlcom (_b[treat_ext_0]-_b[treat_ext_4])-(_b[treat_ext_0]-_b[treat_ext_8]), post
qui reg hi_m_13 treat_ext_1 treat_ext_2 treat_ext_3 treat_ext_4 treat_ext_5 treat_ext_6 treat_ext_7 treat_ext_8 mcoh1 mom_primip coh1 female primip obs_10m3y, vce(cl mom_id)  
nlcom (-_b[treat_ext_1]-_b[treat_ext_3]+_b[treat_ext_4])-(-_b[treat_ext_2]-_b[treat_ext_6]+_b[treat_ext_8]), post

qui reg dom_pct treat_ext_1 treat_ext_2 treat_ext_3 treat_ext_4 treat_ext_5 treat_ext_6 treat_ext_7 treat_ext_8 mcoh3 mom_primip coh3 female primip agedom, vce(cl mom_id)  
nlcom (_b[treat_ext_1]-_b[treat_ext_4])-(_b[treat_ext_2]-_b[treat_ext_8]), post
qui reg dom_pct treat_ext_0 treat_ext_2 treat_ext_3 treat_ext_4 treat_ext_5 treat_ext_6 treat_ext_7 treat_ext_8 mcoh3 mom_primip coh3 female primip agedom, vce(cl mom_id)  
nlcom (_b[treat_ext_0]-_b[treat_ext_3])-(_b[treat_ext_0]-_b[treat_ext_6]), post
qui reg dom_pct treat_ext_1 treat_ext_2 treat_ext_3 treat_ext_4 treat_ext_5 treat_ext_6 treat_ext_7 treat_ext_8 mcoh3 mom_primip coh3 female primip agedom, vce(cl mom_id)  
nlcom (_b[treat_ext_3]-_b[treat_ext_4])-(_b[treat_ext_6]-_b[treat_ext_8]), post
qui reg dom_pct treat_ext_0 treat_ext_1 treat_ext_2 treat_ext_4 treat_ext_5 treat_ext_6 treat_ext_7 treat_ext_8 mcoh3 mom_primip coh3 female primip agedom, vce(cl mom_id)  
nlcom (_b[treat_ext_0]-_b[treat_ext_1])-(_b[treat_ext_0]-_b[treat_ext_2]), post
qui reg dom_pct treat_ext_1 treat_ext_2 treat_ext_3 treat_ext_4 treat_ext_5 treat_ext_6 treat_ext_7 treat_ext_8 mcoh3 mom_primip coh3 female primip agedom, vce(cl mom_id)  
nlcom (_b[treat_ext_3]-_b[treat_ext_1])-(_b[treat_ext_6]-_b[treat_ext_2]), post
qui reg dom_pct treat_ext_0 treat_ext_2 treat_ext_3 treat_ext_4 treat_ext_5 treat_ext_6 treat_ext_7 treat_ext_8 mcoh3 mom_primip coh3 female primip agedom, vce(cl mom_id)  
nlcom (_b[treat_ext_0]-_b[treat_ext_4])-(_b[treat_ext_0]-_b[treat_ext_8]), post
qui reg dom_pct treat_ext_1 treat_ext_2 treat_ext_3 treat_ext_4 treat_ext_5 treat_ext_6 treat_ext_7 treat_ext_8 mcoh3 mom_primip coh3 female primip agedom, vce(cl mom_id)   
nlcom (-_b[treat_ext_1]-_b[treat_ext_3]+_b[treat_ext_4])-(-_b[treat_ext_2]-_b[treat_ext_6]+_b[treat_ext_8]), post













